# -*- coding:utf-8 -*-
# __author__ : "张百科"
# Date: 2021/1/26 16:04
# File: goods.py
# IDE: PyCharm
from django.db import models
from utils.common import prefix


class Goods(models.Model):
    id = models.AutoField(db_column='ID', primary_key=True)  # Field name made lowercase.
    brand_id = models.IntegerField()
    category_id = models.IntegerField()
    goods_sn = models.CharField(max_length=20)
    goods_name = models.CharField(max_length=50, blank=True, null=True)
    sell_volume = models.IntegerField(blank=True, null=True,default=0)
    is_on_sale = models.IntegerField(default=1)
    goods_brief = models.CharField(max_length=200, blank=True, null=True)
    goods_desc = models.TextField()
    list_pic_url = models.CharField(max_length=200)
    index_pic_url = models.CharField(max_length=200, blank=True, null=True)
    goods_unit = models.CharField(max_length=10, blank=True, null=True)
    is_top = models.IntegerField(default=0)
    is_delete = models.IntegerField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = prefix+'goods'